Skip to content

fix: Prevent permission request from stealing focus across cells#1545

Merged
charlesvien merged 3 commits intomainfrom
04-07-prevent_permission_request_from_stealing_focus_across_cells
Apr 9, 2026
Merged

fix: Prevent permission request from stealing focus across cells#1545
charlesvien merged 3 commits intomainfrom
04-07-prevent_permission_request_from_stealing_focus_across_cells

Conversation

@charlesvien
Copy link
Copy Markdown
Member

@charlesvien charlesvien commented Apr 8, 2026

Problem

ActionSelector unconditionally auto-focuses on mount, stealing focus from the active cell's editor when a permission request arrives in another command center cell.

Closes #1503

Changes

  1. Add isUserInInteractiveElement() guard to skip auto-focus when user is in an input/editor
  2. Add autoFocus option to restoreStepAnswer to conditionally skip its focus call on mount
  3. Guard both mount-time focus paths so only idle panels auto-focus

How did you test this?

Manually

@charlesvien charlesvien changed the title Prevent permission request from stealing focus across cells fix: Prevent permission request from stealing focus across cells Apr 8, 2026
@charlesvien charlesvien force-pushed the 04-07-add_double-click_to_rename_task_title_in_session_header branch from b0e356c to bee9269 Compare April 8, 2026 22:55
@charlesvien charlesvien force-pushed the 04-07-prevent_permission_request_from_stealing_focus_across_cells branch from 1c97223 to 86e29b9 Compare April 8, 2026 22:56
Copy link
Copy Markdown
Member Author

charlesvien commented Apr 8, 2026

Merge activity

  • Apr 8, 11:25 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 8, 11:54 PM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 9, 12:00 AM UTC: @charlesvien merged this pull request with Graphite.

@charlesvien charlesvien changed the base branch from 04-07-add_double-click_to_rename_task_title_in_session_header to graphite-base/1545 April 8, 2026 23:47
@charlesvien charlesvien changed the base branch from graphite-base/1545 to main April 8, 2026 23:52
@charlesvien charlesvien force-pushed the 04-07-prevent_permission_request_from_stealing_focus_across_cells branch from 86e29b9 to c747d0c Compare April 8, 2026 23:53
@charlesvien charlesvien merged commit 4f63a70 into main Apr 9, 2026
16 checks passed
@charlesvien charlesvien deleted the 04-07-prevent_permission_request_from_stealing_focus_across_cells branch April 9, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

permission request from agent in command center steals focus

2 participants